<!DOCTYPE html>
<html>
<head>
    <title>栏目树</title>
    $css()$js()
</head>
<body>

    <div class="tree" id="menu_tree" style="padding: 15px 0 15px 20px; background: #FFF;border-top:solid 1px #D0D0D0"></div>

    <script type="text/javascript">

        var treePannel = jr.$fn('#menu_tree');
        var par = treePannel.parent();
        if (par.attr("nodeName") === 'DIV') {
            par.css({ "height": "100%", "overflow": "auto" });
            //par.parent().css({ "height": "100%" });
        }

        function showArchives(src, d, t) {
            d = d.replace(/'/g, "\"");
            var id = JSON.parse(d).cid;
            if (id > 0) {
                parent.FwTab.show(t, '?module=archive&action=list&category.id=' + id, '1_996_' + id);
            }
        };

        jr.tree.load("menu_tree", ${tree}, '/public/assets/tree/', showArchives);

        treePannel.find(".node").each(function (i, e) {
            if (e.attr("nodeName") == "A") {
                var s = e.text();
                if (s.length > 18) {
                    e.html('<span title="' + s + '">'+ s.substring(0, 18)+ '..</span>');
                }
            }
        });
    </script>

</body>
</html>